//
// Created by abstergo on 24-6-15.
//

#ifndef TBS_CPP_MATCHEXPRESSIONS_CUH
#define TBS_CPP_MATCHEXPRESSIONS_CUH

class equals_match_expression {
public:
  template<typename V, typename I>
  bool test(V target, I test) CONST {
	return target == test;
  }
};

class any_match_expression {
public:
  template<typename V, typename I>
  bool test(V target, I test) CONST {
	return true;
  }

};

template<typename F>
template<typename V, typename I>
bool expression_match_expression<F>::test(V target, I test) const {
  return _f();
}

template<typename F>
expression_match_expression<F>::expression_match_expression(F f)
	:_f(f) {}

#endif //TBS_CPP_MATCHEXPRESSIONS_CUH
